﻿using NUnit.Framework;

using octalforty.Syndication.Core;
using octalforty.Syndication.Core.Rss;
using octalforty.Syndication.Core.Rss.Aggregators;

namespace octalforty.Syndication.UnitTests.Core.Rss.Aggregators
{
    /// <summary>
    /// <see cref="RssAggregator"/> unit tests.
    /// </summary>
    [TestFixture()]
    public class RssAggregatorTestFixture : RssAggregatorTestFixtureBase
    {
        [Test()]
        public void Aggregate()
        {
            IAggregator aggregator = new RssAggregator();
            ISyndicationFeed syndicationFeed = null;

            aggregator.Aggregate(feedDocument, ref syndicationFeed);

            Assert.IsNotNull(syndicationFeed);
            Assert.IsAssignableFrom(typeof(RssFeed), syndicationFeed);
        }

        #region AggregatorBaseTestFixture Members
        /// <summary>
        /// When overriden in a derived class, creates an instance of <see cref="IAggregator"/>.
        /// </summary>
        /// <returns></returns>
        protected override IAggregator CreateInstance()
        {
            return new RssAggregator();
        }
        #endregion
    }
}
